online source control
back to content
sign up free version control plan

Commands and Parameters

Commands

Parameters

Commands

The following is a list and general description of all the command-line commands.

Command

Description

About Displays the version information.

Required Params: -id, -username, -pwd
Optional Params: -ssl, -usecacheserver, - cserver, -cport, -ptype, -pserver, -pport, -puser, -ppwd

AddFile Adds one or multiple files to a project. The path of the file on the local machine is specified by the -workdir parameter.

Required Params: -id, -username, -pwd, -repository, -prj, -file, -workdir
Optional Params: -tempdir, -comment, -auto or -mergable or -bin, -notreadonly, -windows or -unix or -mac, -ssl, -usecacheserver, - cserver, -cport, -ptype, -pserver, -pport, -puser, -ppwd
AddFolder Adds an entire local folder to the database. The path of the folder on the local machine is specified by the -workdir parameter. Use -r to add the folder recursively.

Required Params: -id, -username, -pwd, -repository, -prj, -workdir
Optional Params: -tempdir, -comment, -r, -auto or -mergable or -bin, -windows or -unix or -mac, -notreadonly, -ssl, -usecacheserver, - cserver, -cport, -ptype, -pserver, -pport, -puser, -ppwd
AddLabel Adds a label to a project or a file.

Required Params: -id, -username, -pwd, -repository, -prj, -label
Optional Params: -file, -comment, -tempdir, -ssl, -usecacheserver, - cserver, -cport, -ptype, -pserver, -pport, -puser, -ppwd

BranchFile Breaks the share link so that the changes made to that file will no longer be reflected in other projects.

Required Params: -id, -username, -pwd, -repository, -prj, -file
Optional Params:  -comment, -ssl, -usecacheserver, - cserver, -cport, -ptype, -pserver, -pport, -puser, -ppwd
CheckInFile Checks in and unlocks one or multiple files. This command also makes the local files read-only.

Required Params: -id, -username, -pwd, -repository, -prj, -file, -workdir
Optional Params: -comment, -keep, -windows or -unix or -mac, -checkin or -ask or -undo, -del,  -notreadonly, -tempdir, -ssl, -usecacheserver, - cserver, -cport, -ptype, -pserver, -pport, -puser, -ppwd
CheckInProject Checks in and unlocks an entire project. This command also makes the local files in the project read-only. Use -r to check in the project recursively.

Required Params: -id, -username, -pwd, -repository, -prj
Optional Params: -workdir, -r, -comment, -keep, -del, -windows or -unix or -mac, -checkin or -ask or -undo, -notreadonly, -tempdir, -ssl, -usecacheserver, - cserver, -cport, -ptype, -pserver, -pport, -puser, -ppwd
CheckOutFile Checks out and locks one or multiple files in the same project. This command also makes the local files writable.

Required Params: -id, -username, -pwd, -repository, -prj, -file
Optional Params: -workdir, -tempdir, -cancel or -ask or -skip or -replace,-windows or -unix or -mac, -time, -comment, -ssl, -usecacheserver, - cserver, -cport, -ptype, -pserver, -pport, -puser, -ppwd
CheckOutProject Checks out and locks an entire project. This command also makes the local files in the project writable. Use -r to checkout a project recursively.

Required Params: -id, -username, -pwd, -repository, -prj
Optional Params: -workdir, -tempdir, -r, -cancel or -ask or -skip or -replace,-windows or -unix or -mac, -time, -comment, -ssl, -usecacheserver, - cserver, -cport, -ptype, -pserver, -pport, -puser, -ppwd
CreateProject Creates an empty project in the current repository. Use -prj to specify the project path and name.

Required Params: -id, -username, -pwd, -repository, -prj
Optional Params: -comment, -ssl, -usecacheserver, - cserver, -cport, -ptype, -pserver, -pport, -puser, -ppwd
Delete Deletes a file or project from the repository, while local files still exist on the computer. If the -permanent flag is set, the deleted items cannot be recovered.

Required Params:  -id, -username, -pwd, -repository, -prj
Optional Params:  -file, -permanent, -ssl, -usecacheserver, - cserver, -cport, -ptype, -pserver, -pport, -puser, -ppwd
Diff Shows the difference between the local copy of a file and the master copy in the database.

Required Params:  -id, -username, -pwd, -repository, -prj, -file
Optional Params:  -workdir, -ptype, -pserver, -pport, -puser, -ppwd
GetAllRepositories Lists all accessible repositories by the input server.

Required Params: -id
Optional Params:  -ssl, -usecacheserver, - cserver, -cport, -ptype, -pserver, -pport, -puser, -ppwd

GetAllUsers Lists all users in the current repository.

Required Params: -id, -username, -pwd, -repository
Optional Params:  -ssl, -usecacheserver, - cserver, -cport, -ptype, -pserver, -pport, -puser, -ppwd

GetFileHistory Displays the revision history of the file.

Required Params: -id, -username, -pwd, -repository, -prj, -file
Optional Params: -user, -datetime, -ssl, -usecacheserver, - cserver, -cport, -ptype, -pserver, -pport, -puser, -ppwd
GetFileInfo Displays the current information about a file, including type, version number and modified date.

Required Params: -id, -username, -pwd, -repository, -prj, -file
Optional Params:  -ssl, -usecacheserver, - cserver, -cport, -ptype, -pserver, -pport, -puser, -ppwd
GetFileList Lists the full name of all files in the specified project.

Required Params: -id, -username, -pwd, -repository, -prj
Optional Params:  -ssl, -usecacheserver, - cserver, -cport, -ptype, -pserver, -pport, -puser, -ppwd
GetLatestFiles Retrieves the most recent files from the current repository.

Required Params: -id, -username, -pwd, -repository, -prj, -workdir, -file
Optional Params: -tempdir, -writable, -cancel or -ask or -skip or -replace,-time,-windows or -unix or -mac, -ssl, -usecacheserver, - cserver, -cport, -ptype, -pserver, -pport, -puser, -ppwd
GetLoginLog Displays the last 10 login records using your Organization ID.

Required Params: -id, -username, -pwd, -repository
Optional Params:  -ssl, -usecacheserver, - cserver, -cport, -ptype, -pserver, -pport, -puser, -ppwd

GetOldVersionFile Retrieves the old file version from the current repository. The -rev parameter is used to specify an old file version.

Required Params: -id, -username, -pwd, -repository, -prj, -workdir, -file
Optional Params: -rev,  -tempdir, -writable, -cancel or -ask or -skip or -replace,-time,-windows or -unix or -mac, -ssl, -usecacheserver, - cserver, -cport, -ptype, -pserver, -pport, -puser, -ppwd
GetProject Gets the latest version of all files in the specified project from the current repository. Use -r to get the project recursively.

Required Params: -id, -username, -pwd, -repository, -prj, -workdir
Optional Params: -tempdir, -r, -writable, -time (-datetime or -label for Java Command Line), -cancel or -ask or -skip or -replace, -windows or -unix or -mac, -ssl, -usecacheserver, - cserver, -cport, -ptype, -pserver, -pport, -puser, -ppwd

GetProjectHistory Displays the revision history of the project. If the -v flag is set, the histories will be shown by version, or it will be shown by item.

Required Params: -id, -username, -pwd, -repository, -prj
Optional Params: -user, -datetime, -v, -ssl, -usecacheserver, - cserver, -cport, -ptype, -pserver, -pport, -puser, -ppwd

GetProjectTree Graphically displays the project structure.

Required Params: -id, -username, -pwd, -repository, -prj
Optional Params:  -ssl, -usecacheserver, - cserver, -cport, -ptype, -pserver, -pport, -puser, -ppwd
Interactive Puts the Client in an interactive shell, where you can enter commands one after the other, without having to re-run the Command Line Client each time. For example,
SAWHCmd Interactive -id 666 -username test -pwd test -repository "Dynamsoft SourceAnywhere Hosted" -tempdir D:\temp
Now you are in the interactive shell. When you use other commands, the parameters -id, -username, -pwd, -repository are not required until you type 'quit' to exit interactive shell.

Required Params: -id, -username, -pwd, -repository
Optional Params : -tempdir, -ssl, -usecacheserver, - cserver, -cport, -ptype, -pserver, -pport, -puser, -ppwd

Link Shows the projects that share the specified file(s).

Required Params: -id, -username, -pwd, -repository, -prj, -file
Optional Params: -ptype, -pserver, -pport, -puser, -ppwd

PinFile Locks a file to a specified version number. Once an item is pinned, no changes can be made to it and the pinned version becomes the current version of the item.

Required Params: -id, -username, -pwd, -repository, -prj, -file
Optional Params: -rev, -ssl, -usecacheserver, - cserver, -cport, -ptype, -pserver, -pport, -puser, -ppwd

Rename Renames a file or project in the current repository.

Required Params: -id, -username, -pwd, -repository, -prj, -newname
Optional Params: -ssl, -usecacheserver, - cserver, -cport, -ptype, -pserver, -pport, -puser, -ppwd, -file
SetFileType Sets type of the file.

Required Params: -id, -username, -pwd, -repository, -prj, -file, -mergeable or -bin
Optional Params: -ssl, -usecacheserver, - cserver, -cport, -ptype, -pserver, -pport, -puser, -ppwd

ShareFile Shares the current version of one or multiple files to another project. Updates to a shared file will be reflected in all the projects to which the file is shared.

Required Params: -id, -username, -pwd, -repository, -prj, -file, -shareto
Optional Params: -branch, -comment, -ssl, -usecacheserver, - cserver, -cport, -ptype, -pserver, -pport, -puser, -ppwd
ShareProject Shares the current version of a project to another project. Updates to files in a shared project will be reflected in all the projects to which the project is shared.

Required Params: -id, -username, -pwd, -repository, -prj, -shareto
Optional Params: -branch, -r, -comment, -ssl, -usecacheserver, - cserver, -cport, -ptype, -pserver, -pport, -puser, -ppwd
UndoCheckOutFile Cancels the checkout of one or multiple files and reverts to the state before the Check Out operation was performed. This command also makes the local files read-only.

Required Params: -id, -username, -pwd, -repository, -prj, -file
Optional Params: -workdir, -tempdir, -windows or -unix or -mac, -time, -leave or -replace or -del, -notreadonly, -ssl, -usecacheserver, - cserver, -cport, -ptype, -pserver, -pport, -puser, -ppwd
UndoCheckOutProject Cancels the checkout of a project and reverts to the state before the Check Out operation was performed. This command also makes the local files read-only. Use -r to undo checkout of the project recursively.

Required Params: -id, -username, -pwd, -repository, -prj
Optional Params: -workdir, -tempdir, -r,-windows or -unix or -mac,-time, -leave or -replace or -del,-notreadonly, -ssl, -usecacheserver, - cserver, -cport, -ptype, -pserver, -pport, -puser, -ppwd
UnPinFile Cancels the Pin operation, ignoring the files that are not pinned.

Required Params: -id, -username, -pwd, -repository, -prj, -file
Optional Params: -ssl, -usecacheserver, - cserver, -cport, -ptype, -pserver, -pport, -puser, -ppwd


Parameters

The following is a list and description of  parameters accepted by Dynamsoft SourceAnywhere Hosted Command Line. It is necessary to enter full parameter names. If you want to cancel the current operation, type 'c' (for Java Command Line, you need to press Enter after 'c').

Note: Please put a space between a parameter and the value it acts on.

Parameter

Description

-ask Prompts on how to handle the local file copies .

Used with CheckInFile, CheckInProject, CheckOutFile, CheckOutProject, GetLatestFiles, GetOldVersionFile, and GetProject commands.

-auto Auto detects the file type.

Used with AddFile and AddFolder commands.

-bin Sets the file type to be binary.

Used with AddFile, AddFolder and SetFileType commands.

-branch Performs a branch operation immediately after the share operation.

Used with ShareFile and ShareProject commands.

-checkin Updates the unchanged item to a new version.

Used with CheckInFile and CheckInProject commands.

-comment Comments on the corresponding operations with text.

Used with the following commands: AddFile, AddFolder, AddLabel, BranchFile, CheckInFile, CheckInProject, CheckOutFile, CheckOutProject, CreateProject, ShareFile, ShareProject.

-cserver Specifies the IP or domain name of your cache server.

Needed when your own cache server is used.

-cport Specifies the port of your cache server.

Needed when your own cache server is used.

-datetime Specifies a period of time. By default it's from the current time to one year ago. You can type two value in the format "datefrom|dateto", or just one value as the ending date/time of period which begins from the current time .

Acceptable date/time formats:
"16 June 2005", "June 16, 2005  6:10:00", "6:10:00 June 16, 2005", "6/16/2005 6:10:00". (for Windows Command Line)
 "Jun/16/2005", "Jun/16/2005  6:10:00", "6/16/2005", "6/16/2005 6:10:00". (for Java Command Line)

Used with GetFileHistory or GetProjectHistory commands.

-del Deletes the local copy.

Used with CheckInFile, CheckInProject, UndoCheckOutFile, and UndoCheckOutProject commands.

-file Specifies  the name of the file(s) in the repository or the absolute path and full name of the local file(s).

Used with the following commands: AddFile, AddLabel, BranchFile, CheckInFile, CheckOutFile, GetLatestFiles, GetOldVersionFile, GetFileHistory, GetFileInfo, Delete, Rename, SetFileType, ShareFile, UndoCheckOutFile, Pin, and Unpin.

-h /-? Displays help at the command prompt.

Available for all commands.

-id Specifies the organization ID of your hosted account to Login Dynamsoft SourceAnywhere Hosted Server.

A must for all commands.

-keep Keeps checkout status after the check-in operation.

Used with CheckInFile and CheckInProject commands.

-label Specifies a label that can be associated with a particular project version or file version.

Used with AddLabel command.

-leave Leaves the local copy alone.

Used with UndoCheckOutFile and UndoCheckOutProject commands.

-mac Uses Mac EOL for files.

Used with the following commands: AddFile, AddFolder, CheckInFile, CheckInProject, CheckOutFile, CheckOutProject, GetLatestFiles, GetOldVersionFile, GetProject, UndoCheckOutFile, UndoCheckOutProject.

-mergable Sets the file type to be mergable.

Used with AddFile, AddFolder and SetFileType commands.

-newname Specifies a new name for the project or file that is being renamed.

Used with the Rename command.

-notreadonly Doesn't change the file attribute to read-only.

Used with the following commands: AddFile, AddFolder, CheckInProject, CheckInFile, UndoCheckOutProject and UndoCheckOutFile.

-permanent Permanently deletes a file or project from the database.

Used with the Delete command.

-pport Specifies the port of the proxy server.

Needed when the proxy server is used.

-ppwd Specifies the password for the corresponding user to connect to the proxy server.

Needed when the proxy server is used.

-prj Specifies a valid project in the current Dynamsoft SourceAnywhere Hosted repository.

A must for all commands except About, GetAllRepositoties, GetAllUsers and Interactive.

-pserver Specifies the domain name or IP address of the proxy server. If ptype = "None", this parameter is invalid and not required.

Needed when the proxy server is used.

-ptype Specifies the proxy type. Valid -ptype parameters are "None", "Http", "Socks4" and "Socks5", the default value is "None".

Needed when the proxy server is used.

-puser Specifies the user name used to connect to the proxy server. If ptype = "None" or "Socks4", this parameter is invalid and not required.

Needed when the proxy server is used.

-pwd Specifies the password for the corresponding user to log into Dynamsoft SourceAnywhere Hosted repository.

A must for all commands except GetAllRepositories.

-r Performs the project level command recursively.

Used with the following commands: AddFolder, CheckInProject, CheckOutProject, GetProject, ShareProject and UncoCheckOutProject.

-replace Replaces the local copy with file(s) in the repository.

Used with the following commands: CheckOutFile, CheckOutProject, GetLatestFiles, GetOldVersionFile, GetProject, UndoCheckOutFile and UndoCheckOutProject.

-repository Specifies the repository you want to log into.

A must for all commands except GetAllRepositories.

-rev Specifies a version number of the file.

Used with GetOldVersionFile and Pin commands.

-skip Leaves the local copy alone (doesn't retrieve the latest version from the repository).

Used with the following commands: CheckOutFile, CheckOutProject, GetLatestFiles, GetOldVersionFile, and GetProject.

-ssl Connect to Dynamsoft SourceAnywhere Hosted Server through SSL encrypted port.

Needed when you use SSL encrypted port.

-shareto Specifies the project into which a file or project will be shared.

Used with ShareFile and ShareProject commands.

-tempdir Specifies a local folder for storing temporary files. By default it uses the temp directory specified in Windows GUI Client.

Used with the following commands: AddFile, AddFolder, CheckInFile, CheckInProject, CheckOutFile, CheckOutProject, GetLatestFiles, GetOldVersionFile, GetProject, UndoCheckOutFile, and UndoCheckOutProject.

-time Sets the modification time of the local file or project. Valid time parameters are "current" (default), "modi" and "checkin".
    modi - The item's last modified time.
    current - Current time.
    checkin- The item's last checked in time.
Examples: -time modi or -time current or -time checkin.

Used with the following commands: CheckOutFile, CheckOutProject, GetLatestFiles, GetOldVersionFile, GetProject, UndoCheckOutFile, and UndoCheckOutProject.

-undo Undoes the checkout without updating to a new version.

Used with CheckInFile and CheckInProject commands.

-unix Uses Unix EOL for files.

Used with the following commands: AddFile, AddFolder, CheckInFile, CheckInProject, CheckOutFile, CheckOutProject, GetLatestFiles, GetOldVersionFile, GetProject, UndoCheckOutFile, and UndoCheckOutProject.

-usecacheserver Connect to Dynamsoft SourceAnywhere Hosted Server through your cache server.

Needed when your own cache server is used.

-user Specifies an existing username.

Used with GetFileHistory and GetProjectHistory commands.

-username Specifies the user name used to log into Dynamsoft SourceAnywhere Hosted repository.

A must for all commands except GetAllRepositories.

-v Shows the project histories by version.

Used with the GetProjectHistory command.

-verb If present, outputs verbose status messages, such as connections, server responses, etc.
-windows Uses Windows EOL for files.

Used with the following commands: AddFile, AddFolder, CheckInFile, CheckInProject, CheckOutFile, CheckOutProject, GetLatestFiles, GetOldVersionFile, GetProject, UndoCheckOutFile, and UndoCheckOutProject.

-writable Makes the local files writable.

Used with GetLatestFiles, GetOldVersionFile, GetProject.

-workdir Specifies the working folder from which the Command Line Client finds or places items. By default it's Dynamsoft SourceAnywhere Hosted Command Line directory.

Used with the following commands: AddFile, AddFolder, CheckInFile, CheckInProject, CheckOutFile, CheckOutProject, GetLatestFiles, GetOldVersionFile, GetProject, UndoCheckOutFile, and UndoCheckOutProject.